package com.seafwg.multianno.mapper;

import com.seafwg.multianno.domain.Role;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @Author seafwg
 * @Date 2022/3/16 6:01 下午
 * @Version 1.0
 * @description xxx
 */

public interface RoleMapper {

    // 查询角色：通过user id
    @Select("select * from sys_user_role sur, sys_role sr where sur.userId = #{id} and sur.roleId = sr.id")
    List<Role> findRoleByUserId(int id);

}
